﻿// Type: GandA.Component.DataAccess.SQLServer.SQLParameter
// Assembly: GandA.Component.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// Assembly location: C:\CodePlex\CLab\CLab\DLLs\GandA.Component.DataAccess.dll

using System;

namespace GandA.Component.DataAccess.SQLServer
{
    public class SQLParameter
    {
        private string _vStrParamName;
        private object _vObjParamValue;
        private SQLParameter.vEnumSqlDbType _vEnumSqlDbType;
        private SQLParameter.vEnumParameterDirection _vEnumParameterDirection;

        public string ParamName
        {
            get
            {
                return this._vStrParamName;
            }
            set
            {
                this._vStrParamName = value;
            }
        }

        public object ParamValue
        {
            get
            {
                return this._vObjParamValue;
            }
            set
            {
                this._vObjParamValue = value;
            }
        }

        public SQLParameter.vEnumSqlDbType EnumSqlDbType
        {
            get
            {
                return this._vEnumSqlDbType;
            }
            set
            {
                this._vEnumSqlDbType = value;
            }
        }

        public SQLParameter.vEnumParameterDirection EnumParameterDirection
        {
            get
            {
                return this._vEnumParameterDirection;
            }
            set
            {
                this._vEnumParameterDirection = value;
            }
        }

        public SQLParameter(string pParamName, object pParamValue, SQLParameter.vEnumSqlDbType pEnumSqlDbType, SQLParameter.vEnumParameterDirection pEnumSqlParameterDirection)
        {
            this._vObjParamValue = pParamValue == null ? (object)DBNull.Value : pParamValue;
            this._vStrParamName = pParamName;
            this._vEnumSqlDbType = pEnumSqlDbType;
            this._vEnumParameterDirection = pEnumSqlParameterDirection;
        }

        public SQLParameter()
        {
        }

        public enum vEnumSqlDbType
        {
            BigInt = 0,
            Binary = 1,
            Bit = 2,
            Char = 3,
            DateTime = 4,
            Decimal = 5,
            vFloat = 6,
            Image = 7,
            Int = 8,
            Money = 9,
            NChar = 10,
            NText = 11,
            NVarChar = 12,
            Real = 13,
            UniqueIdentifier = 14,
            SmallDateTime = 15,
            SmallInt = 16,
            SmallMoney = 17,
            Text = 18,
            Timestamp = 19,
            TinyInt = 20,
            VarBinary = 21,
            VarChar = 22,
            Variant = 23,
            Xml = 25,
            Udt = 29,
            Structured = 30,
            Date = 31,
            Time = 32,
            DateTime2 = 33,
            DateTimeOffset = 34,
        }

        public enum vEnumParameterDirection
        {
            vInput = 1,
            vOutput = 2,
            vInputOutput = 3,
            vReturnValue = 6,
        }
    }
}
